/*
 * @Author: 周洋 1430536748@qq.com
 * @Date: 2024-07-30 22:59:30
 * @LastEditors: 周洋 1430536748@qq.com
 * @LastEditTime: 2024-08-10 00:48:04
 * @version: 1.2.4
 * @Description: 
 */
import { PropType } from "vue";
import type { TabsPaneContext } from 'element-plus';

export type ICommand={
    label:string,
    value:string | number | object,
    icon:any
}

export type IResultCommand={
    command:string|number,
    path:string 
}

export const props = {
    /** tab选中路由 */
    activeTab: { type: String, required: true },
    /** tab动态列表 */
    tabList: { type: Array<any>, required: true },
    /** 标签栏高度 */
    tabsHeight:{type:Number,default:30},
    /** 下拉菜单列表  */
    commandOptions:{type:Array<ICommand>,default:[]}
}

export interface Emits {
     /** tab单击事件 */
    (e: 'tabClick', pane: TabsPaneContext, ev: Event): () => void;
    /** 单个移除事件 */
    (e: 'tabRemove', pane: string): () => void;
    /** 下拉菜单选中事件 */
    (e:'handleCommand',command:IResultCommand):()=>void;
}
